package com.example.cal_manage;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MyOpenHelper extends SQLiteOpenHelper {
	public MyOpenHelper(Context context){
		super(context,"DBsample",null,1);
	}
	
	@Override
	    public void onCreate(SQLiteDatabase db) {
	        db.execSQL("create table DefaultSettings(Gender INTEGER,"+"Age INTEGER,"+"Height INTEGER);");
	        db.execSQL("create table Alert(Notice INTEGER,"+"Interval INTEGER);");
	        db.execSQL("create table CalManagement(Id text,"+"Weight REAL,"+"Intake REAL,"+"Consumption REAL,"+"Bmi REAL);");
	        db.execSQL("create table GeneralTable(Type text,"+"Items text,"+"Name text,"+"Calory REAL);");
	        db.execSQL("create table RestaurantTable(StoreName text,"+"Genre text,"+"Name text,"+"Calory REAL);");
	        db.execSQL("create table Running(StartDate INTEGER,"+"StartLatitude INTEGER,"+"StartLongitude INTEGER,"+"StopDate INTEGER,"+"StopLatitude INTEGER,"+"StopLongitude INTEGER,"+"OdoMeter INTEGER,"+"UsedCalories INTEGER);");
	        db.execSQL("create table MenuRecord(Id INTEGER,"+"Name text,"+"Calory INTEGER);");
	        db.execSQL("create table Temporary(Name text,"+"Calory INTEGER);");
	    }
	
	@Override
	    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	    }
}
